/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Engine;

import Control.GameController;

/**
 *
 * @author Deathstar
 */
public class MenuActions extends KeyControl {
    private static MenuActions myInstance;


    /**
     * Interpreta as acoes do teclado.
     */
    public void pool()
    {
        if(keyMap['p'] == 1)
        {
            GameController.getInstance().switchPaused();
            keyMap['p'] = 3;
        }
        else if (keyMap['p'] == 2)
        {
            keyMap['p'] = 0;
        }
    }

    /**
     * M?todo respons?vel por retornar a ?nica inst?ncia da classe (singleton)
     * @return Retorna a ?nica inst?ncia da classe.
     */
    public static MenuActions getInstance()
    {
        if(myInstance == null)
        {
            myInstance = new MenuActions();
        }
        return myInstance;
    }
}
